using System;
using System.Collections.Generic;
using System.Text;

namespace Stratman.DesktopProcess.DatabaseSynchronizer
{
    /// <summary>
    /// Interface that should be implemented by any object wishing to serve as an intermediary
    /// between code and a source code control repository.
    /// </summary>
    public interface ISccProvider
    {
        /// <summary>
        /// Checks to see if a given file is under source control.
        /// </summary>
        /// <param name="clientPath">
        /// Path to the file that we are to check.
        /// </param>
        /// <returns>
        /// True if the file is under source control, false otherwise.
        /// </returns>
        bool IsUnderSourceControl(string clientPath);

        /// <summary>
        /// For SCC repositories requiring exclusive checkout, this checks to see if a given file
        /// is checked out.
        /// </summary>
        /// <param name="clientPath">
        /// Path to the file that we are to check.
        /// </param>
        /// <returns>
        /// True if the file is checked out, false otherwise.
        /// </returns>
        bool IsCheckedOut(string clientPath);

        /// <summary>
        /// For SCC repositories requiring exclusive checkout, this checks out a given file.
        /// </summary>
        /// <param name="clientPath">
        /// Path to the file that we are to check out.
        /// </param>
        void CheckOut(string clientPath);

        /// <summary>
        /// Adds a given file to the repository.
        /// </summary>
        /// <param name="clientPath">
        /// Path to the file that we are to add to the repository.
        /// </param>
        void Add(string clientPath);

        /// <summary>
        /// Deletes a given file from the repository.
        /// </summary>
        /// <param name="clientPath">
        /// Path to the file that we are to delete from the repository.
        /// </param>
        void Delete(string clientPath);

        /// <summary>
        /// For applicable SCC providers, returns a list of "special" admin directories used to
        /// store SCC metadata.
        /// </summary>
        List<string> AdminDirectories
        {
            get;
        }
    }
}
